package types;

import java.util.ArrayList;
import control.WordInfo;

public class Complemento {
	private WordInfo adv = null;
	private SubstantivoSimple sub = null;
	private ArrayList<ComplementoAux> complaux;
	
	public Complemento() {
		setComplaux(new ArrayList<ComplementoAux>());
	}

	public void setAdv(WordInfo adv) {
		this.adv = adv;
	}

	public WordInfo getAdv() {
		return adv;
	}

	public void setComplaux(ArrayList<ComplementoAux> complaux) {
		this.complaux = complaux;
	}

	public ArrayList<ComplementoAux> getComplaux() {
		return complaux;
	}
	
	public void addComplementoAux(ComplementoAux comp) {
		complaux.add(comp);
	}
	
	public String toString() {
		String ret = "";
		
		if (adv != null) {
			ret += adv.toString() + " ";
		}
		if (sub != null) {
			ret += sub.toString() + " ";
		}
		for (int i = complaux.size() - 1; i >= 0; i--) {
			ret += complaux.get(i).toString() + " ";
		}
		
		return ret;
	}

	public void setSub(SubstantivoSimple sub) {
		this.sub = sub;
	}

	public SubstantivoSimple getSub() {
		return sub;
	}
}
